package com.example.androidproject.ui.base;

import com.hyg.base.ui.base.BaseActivity;

import butterknife.ButterKnife;

/**
 * FileName: IBaseActivity
 * Author: huangyuguang
 * Date: 2022/5/11
 */
public abstract class IBaseActivity<T extends IBasePresenter> extends BaseActivity<T> {
    private static long mPreTime;

    @Override
    protected void bindButterKnife() {
        ButterKnife.bind(this);
    }

    /**
     * 统一退出控制
     */
//    @Override
//    public void onBackPressed() {
//        if (this instanceof MainActivity){
//            //如果是主页面
//            if (System.currentTimeMillis() - mPreTime > 2000) {// 两次点击间隔大于2秒
//                ToastUtils.show("再按一次退出应用");
//                mPreTime = System.currentTimeMillis();
//                return;
//            }
//        }
//        super.onBackPressed();// finish()
//    }
}
